package webservice;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;

/**
 * @Description: WebService 服务端
 * 发布 WebService
 * @Project: testDemo
 * @Author: hjibo
 * @CreateDate: 2019-03-20 10:02
 * @ModificationHistory:
 */

@WebService
public class WebServiceServer {

    @WebMethod
    public String sayhello(String name) {
        return "Hello, " + name + "\n";
    }

    // 不发布此方法   exclude=true
    @WebMethod(exclude=true)
    public String sayhello2(String name) {
        return "Hello, " +name + "\n";
    }

    public static void main(String[] args) {
        Endpoint.publish("http://192.168.2.125:8888/corp.asmx",new WebServiceServer());
        System.out.println("WebServiceServer publish sucessfully!!!");
    }
}
